-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor import paths in LexicalEditorState #6178
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
import type {SerializedElementNode} from './nodes/LexicalElementNode'; | ||
import type {SerializedRootNode} from './nodes/LexicalRootNode'; | ||
|
||
import invariant from 'shared/invariant'; | ||
|
||
import {$isElementNode, SerializedElementNode} from '.'; | ||
|
||
import {readEditorState} from './LexicalUpdates'; | ||
import {$getRoot} from './LexicalUtils'; | ||
import {$isElementNode} from './nodes/LexicalElementNode'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should auto sort upon saving if not try
./node_modules/.bin/eslint ./ --fix
import type {SerializedRootNode} from './nodes/LexicalRootNode'; | ||
|
||
import invariant from 'shared/invariant'; | ||
|
||
import {$isElementNode, SerializedElementNode} from '.'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: pls remove the extra line (tho auto fix should solve that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the help!
The empty line is removed after saving, and the sorting was also done.
This sort outcome is the outcome from ESLint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks :) |
[lexical] Refactor: Change import paths syntax in LexicalEditorState
Description
The current behavior implements not consistent import approaches which can lead to confusion.
This pull request addresses the issue by using consistent import syntax to make it easier to understand
which module is from where imported.